package com.ics.web.controller.travelstar.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ics.framework.util.PageUtil;
import com.ics.web.controller.travelstar.domain.TiresWarranty;
import com.ics.web.controller.travelstar.dto.TiresWarrantyDTO;
import com.ics.web.controller.travelstar.mapper.TiresWarrantyMapper;
import com.ics.web.controller.travelstar.service.ITiresWarrantyService;
import org.springframework.stereotype.Service;

/**
 * @author shaoly
 * @description
 * @ClassName TiresWarrantyServiceImpl.java
 * @createTime 2024年09月24日 14:27:09
 */
@Service
public class TiresWarrantyServiceImpl extends ServiceImpl<TiresWarrantyMapper, TiresWarranty> implements ITiresWarrantyService {


    @Override
    public IPage<TiresWarranty> listPage(TiresWarrantyDTO warrantyDTO) {
        LambdaQueryWrapper<TiresWarranty> wrapper = Wrappers.lambdaQuery();
        wrapper.orderByDesc(TiresWarranty::getCreateTime);
        return this.baseMapper.selectPage(PageUtil.getPage(warrantyDTO), wrapper);
    }

}
